package com.example.smartcity_poverty.ui.poverty.activity

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.MenuItem
import com.example.smartcity_poverty.R
import com.example.smartcity_poverty.logic.util.Util.show
import kotlinx.android.synthetic.main.activity_show_news2.*

class ShowNewsActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        supportActionBar?.setDisplayHomeAsUpEnabled(true)
        setContentView(R.layout.activity_show_news2)
        title = "扶贫新闻咨询"

        val title = intent.getStringExtra("title")
        val image = intent.getStringExtra("image")?.toInt()
        val content = intent.getStringExtra("content")

        title?.let { textView4.text = title }
        image?.let { imageView2.setImageResource(image) }
        content?.let { TextView5.text = content }

    }

    override fun onOptionsItemSelected(item: MenuItem): Boolean {
        finish()
        return super.onOptionsItemSelected(item)
    }
}